import { createI18n } from "vue-i18n";

const i18n = createI18n({
  locale: "UlEn",
  fallbackLocale: "UlCn",
  messages: {
    UlEn: {
      101: "MyModel",
      102: "Info",
      103: "Search in results",
      104: "Refresh",
      105: "New model",
      106: "Local store",
      107: "From database",
      108: "Model schema only",
      109: "Model with records",
      110: "Model Detail",
      111: "Import from model",
      112: "Model name",
      113: "Field count",
      114: "Record count",
      115: "Tag status",
      116: "Visit request",
      117: "All {0} Handled {1}",
      118: "Fields in {0}",
      119: "Record rules of {0}",
      120: "Records of {0}",
      121: "Detail of {0}",
      122: "Visit group of {0}",
      123: "Visit request of {0}",
      124: "Tag of {0}",
      125: "More filters",
      126: "New record",
      127: "Update time from",
      128: "Editor",
      129: "Field",
      130: "Tag",
      131: "Apply",
      132: "Values",
      133: "Version",
      134: "Key words",
      135: "Records",
      136: "System runtime statistics",
      137: "Up time",
      138: "User count",
      139: "Model count",
      140: "Handled web requests",
      141: "Update time to",
      201: "Login",
      202: "Phone",
      203: "please input your phone number",
      204: "Password",
      205: "please input you password",
      206: "Forgot password ?",
      207: "Remember me 3 days",
      208: "Register",
      209: "Password again",
      210: "Please input password again",
      211: "Different two passwords",
      212: "Register success",
      213: "Runtime settings",
      214: "Exit",
      215: "System settings",
      216: "Backups",
      217: "Rocksdb",
      218: "No permission to action",
      219: "Backup id",
      220: "Backup time",
      221: "Size",
      222: "Backup success",
      223: "Edit",
      224: "Save",
      225: "Cancel",
      226: "Delete",
      227: "Delete with parents",
      228: "Model log",
      229: "Need select a model",
      230: "Log time",
      231: "Log content",
      232: "Action log",
      233: "New chat",
      234: "Message content",
      235: "Send",
      236: "Myself",
      237: "User name",
      238: "Register time",
      239: "Rsa public key",
      240: "Authorization list",
      241: "Drop",
      242: "Change user name",
      243: "Change password",
      244: "Authorization",
      245: "Drop authorization success",
      246: "Query tool",
      247: "Run",
      248: "input sql here",
      249: "too much query results, close some first",
      250: "shared models",
      251: "Send visit request",
      252: "Expect verification way",
      253: "Set an rsa public key, will user your public key as default if keep empty",
      254: "Default visit range of model",
      255: "Expect visit rights",
      256: "Expect to write records",
      257: "Request",
      258: "Visit user count",
      259: "Visit request count",
      260: "My permission",
      261: "Your visit request is denied, change it then you can resend",
      262: "Your visit request is sent, wait fo model owner accept it",
      263: "Need sent visit request",
      264: "Visit request send successful",
      265: "Need select a user",
      301: "Confirm cancel?",
      302: "Code",
      303: "Label",
      304: "Model that use remote store can not change any record",
      305: "Store engine",
      306: "Server host",
      307: "Port",
      308: "Database name",
      309: "Table name",
      310: "Update timestamp colum name",
      311: "Import as new model",
      312: "Add field",
      313: "Delete selected field",
      314: "Save",
      315: "Display label",
      316: "Type",
      317: "Display order",
      318: "Required",
      319: "Multi values",
      320: "Field has more than 1 value, can set more detail rules in record limits",
      321: "Tips on input",
      322: "Min length",
      323: "0 or empty take no effect",
      324: "Max length",
      // 325: "输入0以上的数字,规则的限制生效,输入0则不生效",
      326: "Formate pattern",
      327: "No pattern",
      328: "Email",
      329: "Id of Chinese",
      330: "Telephone number",
      331: "Min value",
      332: "Keep empty if you want no limit",
      333: "Max value",
      334: "Max length after point",
      335: "Number unit label",
      336: "Format",
      337: "Compute command",
      338: "Reference model",
      339: "Display from field",
      340: "Create field success",
      341: "Edit field success",
      342: "Re import fields success",
      343: "Record ID",
      344: "Integer",
      345: "Maintainer ID",
      346: "Update time",
      347: "Time",
      348: "Tag",
      349: "No Tag for model",
      350: "Tag for model: {0}",
      351: "Upload file",
      352: "Successful upload file {0}",
      353: "Failed to upload file {0}",
      354: "Last update user",
      355: "Last update time",
      356: "Model name",
      357: "Model name is required",
      358: "Can visit by other users",
      359: "Default visit range",
      360: "Model memo",
      361: "Edit model success",
      362: "Create model success",
      363: "Remove model success",
      364: "Old password",
      365: "Old password required",
      366: "New password",
      367: "New password again",
      368: "Password not acceptable, try more complex one",
      370: "Change password success",
      371: "Version count of record",
      372: "View",
      373: "Link a record",
      374: "Save old record as a version",
      375: "Save record success",
      376: "Limit of model record",
      377: "New Limit",
      378: "Limit type",
      379: "More records",
      380: "Values of multi field",
      381: "Record detail",
      382: "Visit group details",
      383: "Authorize method",
      384: "Visit range",
      385: "Limit detail",
      386: "Users in group",
      387: "New visit group",
      388: "Authorized users",
      389: "Group name",
      390: "Group type",
      391: "Public key for visit",
      392: "Password for visit",
      393: "Visit code",
      394: "Visitor",
      401: "New user name",
      402: "New user name required",
      403: "User name not acceptable",
      404: "Change user name success",
      405: "Tag:",
      406: "Select a node in left tree, then can change tag of selected node",
      407: "Press enter to cache tags, press save button to post all tags to really save",
      408: "A tag can only contains character or number",
      409: "Tag for model can not be same, tags in model can not be same as each other",
      410: "Save tags success",
      411: "Handle",
      412: "Reason of deny",
      413: "Deny",
      414: "Selectable visit groups",
      415: "Accept",
      416: "Requester",
      417: "Request time",
      418: "Handle time",
      419: "Visit status",
      420: "Need handle",
      421: "Handle success",
      422: "Messages",
      423: "Maintenance",
      424: "Private data",
      425: "My model",
      426: "Query tool",
      427: "Share data",
      428: "Shared model",
      429: "Review",
      430: "User log",
      431: "Model log",
      432: "Settings",
      433: "Profile",
      434: "Unique Value",
    },
    UlCn: {
      101: "我的模型",
      102: "系统提示",
      103: "在结果中搜索",
      104: "刷新",
      105: "新建模型",
      106: "本机存放",
      107: "从数据源导入",
      108: "仅模型定义",
      109: "模型定义和记录",
      110: "模型信息",
      111: "从数据源导入",
      112: "模型名称",
      113: "字段数",
      114: "记录数",
      115: "标记情况",
      116: "访问请求",
      117: "共 {0} 已处理 {1}",
      118: "{0} 的字段",
      119: "{0} 的记录规则",
      120: "{0} 的记录",
      121: "{0} 的基础信息",
      122: "{0} 的访问组",
      123: "{0} 的访问请求",
      124: "{0} 的标记",
      125: "更多查询条件",
      126: "新建记录",
      127: "更新时间起",
      128: "维护者",
      129: "字段",
      130: "标记",
      131: "应用",
      132: "Values",
      133: "版本号",
      134: "Key words",
      135: "记录",
      136: "系统运行状态",
      137: "运行时长",
      138: "平台用户数",
      139: "模型总数",
      140: "处理请求数",
      141: "更新时间止",
      201: "登录",
      202: "手机",
      203: "请输入绑定手机",
      204: "密码",
      205: "请输入密码",
      206: "忘记密码?",
      207: "三天内不用再登录",
      208: "注册",
      209: "确认密码",
      210: "请输入密码",
      211: "两次密码输入不一致",
      212: "注册成功",
      213: "运维管理",
      214: "退出",
      215: "系统管理",
      216: "备份与恢复",
      217: "数据管理",
      218: "无权继续操作",
      219: "备份号",
      220: "备份时间",
      221: "占用空间",
      222: "备份成功",
      223: "修改",
      224: "保存",
      225: "取消",
      226: "删除",
      227: "删除同级",
      228: "模型日志",
      229: "请选择一个模型",
      230: "日志时间",
      231: "日志",
      232: "操作日志",
      233: "发起对话",
      234: "输入消息内容",
      235: "发送",
      236: "自己",
      237: "用户名",
      238: "注册日期",
      239: "公钥",
      240: "已获得的授权",
      241: "作废",
      242: "修改用户名",
      243: "修改密码",
      244: "授权情况",
      245: "访问授权删除成功",
      246: "查询工具",
      247: "执行",
      248: "在此输入sql",
      249: "暂存的查询结果太多，请先关闭几个",
      250: "共享的模型",
      251: "发送访问申请",
      252: "期望认证方式",
      253: "请填入对接使用的公钥，如果不填，将使用系统分配给你的密钥对中的公钥",
      254: "模型预设访问范围",
      255: "额外的访问权限",
      256: "需要写数据",
      257: "提交申请",
      258: "访问人数",
      259: "访问请求数",
      260: "我的权限",
      261: "访问请求已被拒绝，请修改请求后重新发送",
      262: "访问请求已发送，请等待作者通过",
      263: "待申请访问权限",
      264: "访问请求发送成功",
      265: "请选择一个用户",
      301: "确认取消编辑?",
      302: "代码",
      303: "标签",
      304: "使用外部存储的模型，无论是自有的还是共享的，都只能读取查询数据，不能进行任何修改",
      305: "存储引擎",
      306: "服务器地址",
      307: "服务端口",
      308: "数据库名称",
      309: "表名称",
      310: "更新时间戳列",
      311: "导入为模型",
      312: "增加字段",
      313: "删除选中字段",
      314: "保存",
      315: "展示名称",
      316: "类型",
      317: "显示顺序",
      318: "必填",
      319: "多个值",
      320: "此字段可以重复填写,重复规则在记录设置中可以更精细设置",
      321: "输入建议",
      322: "最小长度",
      323: "输入0以上的数字,规则的限制生效,输入0则不生效",
      324: "最大长度",
      // 325: "输入0以上的数字,规则的限制生效,输入0则不生效",
      326: "格式规则",
      327: "无要求",
      328: "电子邮箱地址",
      329: "身份证号",
      330: "座机号码",
      331: "最小值",
      332: "不想做限制则不要填写任何数值",
      333: "最大值",
      334: "最多小数位",
      335: "数值单位",
      336: "格式",
      337: "计算方式",
      338: "目标模型",
      339: "展示字段",
      340: "新建字段成功",
      341: "修改字段成功",
      342: "重新导入字段成功",
      343: "记录主键",
      344: "数字",
      345: "作者主键",
      346: "更新时间",
      347: "日期时间",
      348: "模型标记",
      349: "模型标记未设置",
      350: "模型标记: {0}",
      351: "上传文件",
      352: "{0} 上传成功",
      353: "{0} 上传失败",
      354: "最近记录维护人员",
      355: "最近记录维护时间",
      356: "模型名称",
      357: "模型名称必须填写",
      358: "打开共享",
      359: "默认共享范围",
      360: "模型说明",
      361: "模型保存成功",
      362: "模型新建成功",
      363: "模型删除成功",
      364: "旧密码",
      365: "旧密码必须填写",
      366: "新密码",
      367: "确认新密码",
      368: "密码不合规",
      369: "两次密码不相同",
      370: "修改密码成功",
      371: "当前记录版本数",
      372: "查看",
      373: "关联记录",
      374: "将旧值保存一个版本",
      375: "保存记录成功",
      376: "模型记录限制",
      377: "新建限制",
      378: "限制类型",
      379: "加载更多",
      380: "字段值",
      381: "记录详情",
      382: "访问组详情",
      383: "身份认证方式",
      384: "额外数据授权",
      385: "详细限制规则",
      386: "组内成员",
      387: "新建访问组",
      388: "已授权用户",
      389: "访问组名称",
      390: "组类型",
      391: "访问公钥",
      392: "访问密码",
      393: "访问码",
      394: "组员",
      401: "新用户名",
      402: "新用户名必须填写",
      403: "用户名不合规",
      404: "修改用户名成功",
      405: "标记：",
      406: "选中左侧树中节点，修改对应节点的标记",
      407: "输入标记后,按Enter键暂存修改,最后点击保存按钮",
      408: "标记用于在网关外请求时标记数据记录，只能包含英文字母和数字，不能包含其他字符",
      409: "模型标记不能相同，字段标记在一个模型内不能相同",
      410: "保存标记成功",
      411: "处置",
      412: "拒绝申请理由",
      413: "拒绝",
      414: "可选访问组",
      415: "通过",
      416: "申请人",
      417: "请求日期",
      418: "处理日期",
      419: "处理结果",
      420: "待处理",
      421: "处理成功",
      422: "消息",
      423: "运维管理",
      424: "私有数据",
      425: "我的模型",
      426: "查询工具",
      427: "共享数据",
      428: "共享的模型",
      429: "审计",
      430: "操作日志",
      431: "事件日志",
      432: "设置",
      433: "个人信息",
      434: "值唯一",
    },
  },
});

// console.log(i18n);

fetch("/api/v1/locale", {
  headers: {
    Authorization: `Bearer ${localStorage.getItem("token")}`,
  },
})
  .then((res) => res.json())
  .then((arm) => {
    if (arm.ok) {
      i18n.global.locale = arm.data;
    }
  });

export default i18n;
